function cond=gammac(a,x,p,eta,mu,f0,f1)
% function to check whether the provided steplength satisfies gamma 
% condition.
% INPUT:
%       a-current steplength (1*1);
%       x-current iterate (n*1);
%       p-search direction (n*1);
%       eta-constant for armijo(1*1);
%       mu-constant for strong wolfe (1*1);
%       f0-function handle of the objective function (Rn->R);
%       f1-the gradient of the function (Rn->Rn);
% OUTPUT:
%       cond-1 or 0 to present whether the condition holds;
% REVISION:
%       jqin, 15/feb/2011, created
if (armijo(a,x,p,eta,f0,f1)&&swolfe(a,x,p,mu,f1))
    cond=1;
else 
    cond=0;
end
end
